#!/bin/sh

# $1 = username 
# $2 = checkout or checkin
# $3 = path in which to start looking for files (for check in)/ Tag to checkout (for checkout)
if [ $# -ne 1 ]; then echo "Usage: $0 [module]"; exit 1; fi

MOD_NAME=$1

FILES=`find $MOD_NAME`
COMMENT="initial check-in"

for file in $FILES
do

        if [ -f $file ]
        then
        if file $file | grep -q "text"
        then 
           echo TEXT : $file
           cvs add $file
        else
           echo Binary : $file
           cvs add -kb $file
        fi
           cvs commit -m "$COMMENT" $file
        else
           cvs add $file
        fi
done
